package com.wngbms._05_param;

import java.util.ArrayList;
import java.util.List;
import java.util.UUID;

/**
 -Xmn100m
 -Xms500m
 -Xmx500m
 -XX:+HeapDumpOnOutOfMemoryError
 -XX:HeapDumpPath=D:\
 -XX:OnError="notepad"
 -XX:OnOutOfMemoryError="explorer"
 -XX:ErrorFile=D:\error.log
 */
public class JvmParam {

    /**
     * java.lang.OutOfMemoryError: Java heap space
     * Dumping heap to D:\java_pid9620.hprof ...
     * Heap dump file created [555974596 bytes in 1.427 secs]
     * #
     * # java.lang.OutOfMemoryError: Java heap space
     * # -XX:OnOutOfMemoryError="explorer"
     * #   Executing "explorer"...
     *
     * @param args
     */
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        while (true) {
            list.add(UUID.randomUUID().toString());
        }
    }
}
